home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000824-20010305 / 000162_news@columbia.edu _Fri Dec 29 14:12:36 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by fozimane.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id OAA09150
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 29 Dec 2000 14:12:36 -0500 (EST)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA02770
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 29 Dec 2000 14:12:35 -0500 (EST)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id OAA10893
  10.     for kermit.misc@watsun.cc.columbia.edu; Fri, 29 Dec 2000 14:10:06 -0500 (EST)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: Barry Margolin <barmar@genuity.net>
  13. Subject: Re: Converting struct tm to time_t
  14. Organization: Genuity, Cambridge, MA
  15. Message-ID: <_i536.49$GV6.477@burlma1-snr2>
  16. Date: Fri, 29 Dec 2000 19:08:42 GMT
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <92im31$9ii$1@newsmaster.cc.columbia.edu>,
  20. Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
  21. >In article <yllmszt7lk.fsf@windlord.stanford.edu>,
  22. >Russ Allbery  <rra@stanford.edu> wrote:
  23. >: My code doesn't assume it's unsigned; it just won't generate negative
  24. >: time_t values.  It works fine on systems with a signed time_t (basically
  25. >: all of them).
  26. >: 
  27. >OK, great.
  28. >
  29. >: I believe that both of these assumptions are required by POSIX; they're
  30. >: certainly true on every UNIX system that I've ever seen.
  31. >:
  32. >But there are still lots of non-POSIX UNIXes running and I try to support
  33. >them.
  34.  
  35. I believe the assumption that time_t is an integer seconds since 1/1/1970
  36. 00:00 UT has been true on all Unix systems.  POSIX didn't originate it, it
  37. simply adopted the de facto standard.  Unix programs that deal with time
  38. have been making this assumption for years.  The only change I expect will
  39. ever happen is the size of the integer type, to deal with the Y2.036K bug.
  40.  
  41. ANSI/ISO C generalized it to allow other representations, so you might not
  42. be able to get away with it on non-Unix-like systems.
  43.  
  44. -- 
  45. Barry Margolin, barmar@genuity.net
  46. Genuity, Burlington, MA
  47. *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
  48. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.